import Login from 'views/login'
import WechatLogin from 'views/wechatLogin'
import Register from 'views/register'
import Setting from 'views/Setting'
import ResetPassword from 'views/resetPassword'
import ForgetPassword from 'views/forgetPassword'
import SetPassword from 'views/setPassword'
import Coupons from 'views/coupons'
import BindPhone from 'views/bindPhone'
import Activated from 'views/activated'
import Contact from 'views/contact'

let account = [
  {
    path: '/',
    name: 'Login',
    component: Login,
    beforeEnter: (to, from, next) => {
      if (false) {
        next({ name: "Personal" });
      } else {
        next();
      }
    }
  },
  {
    path: '/login',
    name: 'Login',
    component: Login
  },
  {
    path: '/wechatlogin',
    name: 'WechatLogin',
    component: WechatLogin
  },
  {
    path: '/register',
    name: 'Register',
    component: Register
  },
  {
    path: '/setting',
    name: 'Setting',
    component: Setting,
    meta: {
      requireAuth: true // 添加该字段，表示进入这个路由是需要登录的
    },
  },
  {
    path: '/resetPassword',
    name: 'ResetPassword',
    component: ResetPassword
  },
  {
    path: '/forgetPassword',
    name: 'ForgetPassword',
    component: ForgetPassword
  },
  {
    path: '/setPassword',
    name: 'SetPassword',
    component: SetPassword
  },
  {
    path: '/coupons',
    name: 'Coupons',
    component: Coupons
  },
  {
    path: '/bindPhone',
    name: 'BindPhone',
    component: BindPhone
  },
  {
    path: '/activated',
    name: 'Activated',
    component: Activated
  },
  {
    path: '/contact',
    name: 'Contact',
    component: Contact
  }
]

export default account
